package com.shanzhu.book.mapper;

import com.shanzhu.book.model.Notice;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface NoticeMapper {
    int deleteByPrimaryKey(Long noticeid);

    int insert(Notice record);

    int insertSelective(Notice record);

    Notice selectByPrimaryKey(Long noticeid);

    int updateByPrimaryKeySelective(Notice record);

    int updateByPrimaryKey(Notice record);

    Notice selectByNoticenameAndPasswordAndIsAdmin(@Param("noticename") String noticename,
                                  @Param("password") String password,
                                  @Param("isAdmin") Byte isAdmin);

    Notice selectByNoticename(String noticename);

    List<Notice> selectAllByLimit(@Param("begin") Integer begin, @Param("size") Integer size);

    Integer selectCount();

    List<Notice> selectAll();

    int selectCountBySearch(Map<String, Object> params);

    List<Notice> selectBySearch(Map<String, Object> params);
}
